home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 1.0 for Developers / QuickTime 1.0 for Developers.iso / Programming Stuff / Interfaces / Movies Interfaces / ImageCompression.p < prev    next >
Text File  |  1991-09-06  |  22KB  |  465 lines

  1.  
  2. {
  3. Created: Tuesday, August 13, 1991 at 4:31 PM
  4.  ImageCompression.p
  5.  Pascal Interface to the Macintosh Libraries
  6.  
  7.  Copyright Apple Computer, Inc. 1991
  8.  All rights reserved
  9. }
  10.  
  11.  
  12. {$IFC UNDEFINED UsingIncludes}
  13. {$SETC UsingIncludes := 0}
  14. {$ENDC}
  15.  
  16. {$IFC NOT UsingIncludes}
  17.  UNIT ImageCompression;
  18.  INTERFACE
  19. {$ENDC}
  20.  
  21. {$IFC UNDEFINED UsingImageCompression}
  22. {$SETC UsingImageCompression := 1}
  23.  
  24. {$I+}
  25. {$SETC ImageCompressionIncludes := UsingIncludes}
  26. {$SETC UsingIncludes := 1}
  27. {$IFC UNDEFINED UsingQuickDraw}
  28. {$I $$Shell(PInterfaces)QuickDraw.p}
  29. {$ENDC}
  30. {$IFC UNDEFINED UsingQDOffscreen}
  31. {$I $$Shell(PInterfaces)QDOffscreen.p}
  32. {$ENDC}
  33. {$IFC UNDEFINED UsingTypes}
  34. {$I $$Shell(PInterfaces)Types.p}
  35. {$ENDC}
  36. {$IFC UNDEFINED UsingComponents}
  37. {$I $$Shell(PInterfaces)Components.p}
  38. {$ENDC}
  39. {$SETC UsingIncludes := ImageCompressionIncludes}
  40.  
  41. CONST
  42. gestaltCompressionMgr = 'icmp';
  43.  
  44. { These are the bits that are set in the Component flags, and also in the codecInfo struct. }
  45.  
  46. codecInfoDoes1 = $1;                    { codec can work with 1-bit pixels }
  47. codecInfoDoes2 = $2;                    { codec can work with 2-bit pixels }
  48. codecInfoDoes4 = $4;                    { codec can work with 4-bit pixels }
  49. codecInfoDoes8 = $8;                    { codec can work with 8-bit pixels }
  50. codecInfoDoes16 = $10;                    { codec can work with 16-bit pixels }
  51. codecInfoDoes32 = $20;                    { codec can work with 32-bit pixels }
  52. codecInfoDoesDither = $40;                { codec can do ditherMode }
  53. codecInfoDoesStretch = $80;                { codec can stretch to arbitrary sizes }
  54. codecInfoDoesShrink = $100;                { codec can shrink to arbitrary sizes }
  55. codecInfoDoesMask = $200;                { codec can mask to clipping regions }
  56.  
  57. codecInfoDoesTemporal = $400;            { codec can handle temporal redundancy }
  58.  
  59. codecInfoDoesDouble = $800;                { codec can stretch to double size exactly }
  60. codecInfoDoesQuad = $1000;                { codec can stretch to quadruple size exactly }
  61. codecInfoDoesHalf = $2000;                { codec can shrink to half size }
  62. codecInfoDoesQuarter = $4000;            { codec can shrink to quarter size }
  63.  
  64. codecInfoDoesRotate = $8000;            { codec can rotate on decompress }
  65. codecInfoDoesHorizFlip = $10000;        { codec can flip horizontally on decompress }
  66. codecInfoDoesVertFlip = $20000;            { codec can flip vertically on decompress }
  67. codecInfoDoesSkew = $40000;                { codec can skew on decompress }
  68. codecInfoDoesBlend = $80000;            { codec can blend on decompress }
  69. codecInfoDoesWarp = $100000;            { codec can warp arbitrarily on decompress }
  70. codecInfoDoesRecompress = $200000;        { codec can recompress image without accumulating errors }
  71.  
  72. codecInfoDepth1 = $1;                    { compressed data at 1 bpp depth available }
  73. codecInfoDepth2 = $2;                    { compressed data at 2 bpp depth available }
  74. codecInfoDepth4 = $4;                    { compressed data at 4 bpp depth available }
  75. codecInfoDepth8 = $8;                    { compressed data at 8 bpp depth available }
  76. codecInfoDepth16 = $10;                    { compressed data at 16 bpp depth available }
  77. codecInfoDepth32 = $20;                    { compressed data at 32 bpp depth available }
  78. codecInfoDepth24 = $40;                    { compressed data at 24 bpp depth available }
  79. codecInfoDepth33 = $80;                    { compressed data at 1 bpp monochrome depth  available }
  80. codecInfoDepth34 = $100;                { compressed data at 2 bpp grayscale depth available }
  81. codecInfoDepth36 = $200;                { compressed data at 4 bpp grayscale depth available }
  82. codecInfoDepth40 = $400;                { compressed data at 8 bpp grayscale depth available }
  83. codecInfoStoresClut = $800;                { compressed data can have custom cluts }
  84.  
  85. codecFlagUseImageBuffer = $1;            { (input) allocate buffer for whole image on decompress sequence }
  86. codecFlagUseScreenBuffer = $2;            { (input) allocate buffer for screen on decompress sequence for faster updates }
  87. codecFlagUpdatePrevious = $4;            { (input) udate previous buffer on compress sequence }
  88. codecFlagNoScreenUpdate = $8;            { (input) dont update screen, but do update image buffer if allocated }
  89. codecFlagWasCompressed = $10;            { (input) hint to compressor that image was previously compressed }
  90. codecFlagDontOffscreen = $20;            { return error instead of automatically going offscreen }
  91. codecFlagUpdatePreviousComp = $40;        { (input) udate previous buffer on compress sequence }
  92. codecFlagForceKeyFrame = $80;            { when sent to CompressSequenceFrame, forces that frame to be a key frame }
  93.  
  94. codecFlagUsedImageBuffer = $8000;        { (output) indicates that image buffer was used on this decompress sequence }
  95.  
  96. codecErr = -8960;                        { the codec returned an error }
  97. noCodecErr = -8961;                        { the specified codec could not be found }
  98. codecUnimpErr = -8962;                    { this feature is not implemented by the specified codec }
  99. codecSizeErr = -8963;
  100. codecScreenBufErr = -8964;                { the screen buffer could not be allocated }
  101. codecImageBufErr = -8965;                { the image buffer could not be allocated }
  102. codecSpoolErr = -8966;                    { the compressed data must be in memory (spooling did not work) }
  103. codecAbortErr = -8967;                    { the operation was aborted by the progress proc }
  104. codecWouldOffscreenErr = -8968;            { an offscreen access would have been used, but wasn't allowed because codecFlagDontOffscreen was set }
  105. codecBadDataErr = -8969;                { compressed data was found to have inconsistencies }
  106. codecDataVersErr = -8970;                { compressed data was of a format version that codec couldn't handle }
  107.  
  108. codecMinimumDataSize = 16384;            { The minimum data size for spooling in or out data }
  109.  
  110. compressorComponentType = 'imco';        { the type for "Components" which compress images }
  111. decompressorComponentType = 'imdc';        { the type for "Components" which decompress images }
  112.  
  113. TYPE
  114. CompressorComponent = Component;        { a Component which compresses images }
  115. DecompressorComponent = Component;        { a Component which decompresses images }
  116. CodecComponent = Component;                { a Component which decompresses or compresses images }
  117.  
  118. sBoolean = INTEGER;                        { to make sure stack frames are right }
  119.  
  120. CodecType = LONGINT;                    { type descriptor for codecs i.e: 'appl','jpeg','rle ' }
  121.  
  122. CodecFlags = INTEGER;                    { flags for codec manager calls }
  123.  
  124. CodecQ = LONGINT;
  125. DataProcPtr = OSErr;
  126. FlushProcPtr = OSErr;
  127.  
  128. CONST
  129. codecCompletionSource = 1;
  130. codecCompletionDest = 2;
  131.  
  132. TYPE
  133. CompletionProcPtr = ProcPtr;
  134.  
  135. CONST
  136. codecProgressOpen = 0;
  137. codecProgressUpdatePercent = 1;
  138. codecProgressClose = 2;
  139.  
  140. TYPE
  141. ProgressProcPtr = ProcPtr;
  142.  
  143. ImageSequence = LONGINT;
  144.  
  145. ProgressProcRecordPtr = ^ProgressProcRecord;
  146. ProgressProcRecord = RECORD
  147.  progressProc: ProgressProcPtr;
  148.  progressRefCon: LONGINT;
  149.  END;
  150.  
  151. CompletionProcRecordPtr = ^CompletionProcRecord;
  152. CompletionProcRecord = RECORD
  153.  completionProc: CompletionProcPtr;
  154.  completionRefCon: LONGINT;
  155.  END;
  156.  
  157. DataProcRecordPtr = ^DataProcRecord;
  158. DataProcRecord = RECORD
  159.  dataProc: DataProcPtr;
  160.  dataRefCon: LONGINT;
  161.  END;
  162.  
  163. FlushProcRecordPtr = ^FlushProcRecord;
  164. FlushProcRecord = RECORD
  165.  flushProc: FlushProcPtr;
  166.  flushRefCon: LONGINT;
  167.  END;
  168.  
  169.     The ImageDescription is private data which is produced when an image or sequence 
  170.     is compressed. It fully describes the format of the compressed data.}
  171.  
  172. ImageDescriptionPtr = ^ImageDescription;
  173. ImageDescriptionHandle = ^ImageDescriptionPtr;
  174. ImageDescription = RECORD
  175.  idSize: LONGINT;                        { total size of ImageDescription including extra data ( CLUTs and other per sequence data }
  176.  cType: CodecType;                        { what kind of codec compressed this data }
  177.  resvd1: LONGINT;                        { reserved for apple use }
  178.  resvd2: INTEGER;                        { reserved for apple use }
  179.  dataRefIndex: INTEGER;                    { set to zero }
  180.  version: INTEGER;                        { which version is this data }
  181.  revisionLevel: INTEGER;                { what version of that codec did this }
  182.  vendor: LONGINT;                        { whose  codec compressed this data }
  183.  temporalQuality: CodecQ;                { what was the temporal quality factor          }
  184.  spatialQuality: CodecQ;                { what was the spatial quality factor          }
  185.  width: INTEGER;                        { how many pixels wide is this data }
  186.  height: INTEGER;                        { how many pixels high is this data }
  187.  hRes: Fixed;                            { horizontal resolution }
  188.  vRes: Fixed;                            { vertical resolution }
  189.  dataSize: LONGINT;                        { if known, the size of data for this image descriptor }
  190.  frameCount: INTEGER;                    { number of frames this description applies to }
  191.  name: ARRAY [0..31] OF CHAR;            { name of codec ( in case not installed ) }
  192.  depth: INTEGER;                        { what depth is this data (1-32) or ( 33-40 grayscale ) }
  193.  clutID: INTEGER;                        { clut id or if 0 clut follows  or -1 if no clut }
  194.  END;
  195.  
  196.     The CodecInfo is the information returned as the codecInfo struct by a codec Component
  197.     to the codec manager or to the caller. It is specific to the particular codec
  198.     implementation and not to the codec type.}
  199.  
  200. CodecInfo = RECORD
  201.  typeName: ARRAY [0..31] OF CHAR;        { name of the codec type i.e.: 'Apple Image Compression' }
  202.  version: INTEGER;                        { version of the codec data that this codec knows about }
  203.  revisionLevel: INTEGER;                { revision level of this codec i.e: 0x00010001 (1.0.1) }
  204.  vendor: LONGINT;                        { Maker of this codec i.e: 'appl' }
  205.  decompressFlags: LONGINT;                { codecInfo flags for decompression capabilities }
  206.  compressFlags: LONGINT;                { codecInfo flags for compression capabilities }
  207.  formatFlags: LONGINT;                    { codecInfo flags for compression format details }
  208.  compressionAccuracy: CHAR;                { measure (1-255) of accuracy of this codec for compress (0 if unknown) }
  209.  decompressionAccuracy: CHAR;            { measure (1-255) of accuracy of this codec for decompress (0 if unknown) }
  210.  compressionSpeed: INTEGER;                { ( millisecs for compressing 320x240 on base mac II) (0 if unknown) }
  211.  decompressionSpeed: INTEGER;            { ( millisecs for decompressing 320x240 on mac II)(0 if unknown) }
  212.  compressionLevel: CHAR;                { measure (1-255) of compression level of this codec (0 if unknown) }
  213.  resvd: CHAR;                            { pad }
  214.  minimumHeight: INTEGER;                { minimum height of image (block size) }
  215.  minimumWidth: INTEGER;                    { minimum width of image (block size) }
  216.  decompressPipelineLatency: INTEGER;    { in milliseconds ( for asynchronous codecs ) }
  217.  compressPipelineLatency: INTEGER;        { in milliseconds ( for asynchronous codecs ) }
  218.  privateData: LONGINT;
  219.  END;
  220.  
  221. { Table used for fast dithering. }
  222. DTabPtr = ^DitherTable;
  223. DTabHandle = ^DTabPtr;
  224. DitherTable = RECORD
  225.  tag: LONGINT;
  226.  seed: LONGINT;
  227.  reserved: LONGINT;
  228.  data: ARRAY [0..0] OF CHAR;
  229.  END;
  230.  
  231. { Name list returned by GetCodecNameList. }
  232. CodecNameSpec = RECORD
  233.  codec: CodecComponent;
  234.  cType: CodecType;
  235.  typeName: ARRAY [0..31] OF CHAR;
  236.  name: Handle;
  237.  END;
  238.  
  239. CodecNameSpecListPtr = ^CodecNameSpecList;
  240. CodecNameSpecList = RECORD
  241.  count: INTEGER;
  242.  list: ARRAY [0..0] OF CodecNameSpec;
  243.  END;
  244.  
  245. {  Matrix stuff  }
  246. MatrixRecordPtr = ^MatrixRecord;
  247. MatrixRecord = RECORD
  248.  matrix: ARRAY [0..2,0..2] OF Fixed;
  249.  END;
  250.  
  251. FixedPoint = RECORD
  252.  x: Fixed;
  253.  y: Fixed;
  254.  END;
  255.  
  256. FixedRect = RECORD
  257.  left: Fixed;
  258.  top: Fixed;
  259.  right: Fixed;
  260.  bottom: Fixed;
  261.  END;
  262.  
  263.  
  264. FUNCTION CodecManagerVersion(VAR version: LONGINT): OSErr;
  265.  INLINE $7000+$0000,$AAA3;
  266. FUNCTION GetCodecNameList(VAR list: CodecNameSpecListPtr;showAll: sBoolean): OSErr;
  267.  INLINE $7000+$0001,$AAA3;
  268. FUNCTION GetCodecInfo(VAR info: CodecInfo;cType: CodecType;codec: CodecComponent): OSErr;
  269.  INLINE $7000+$0003,$AAA3;
  270. FUNCTION GetMaxCompressionSize(src: PixMapHandle;VAR srcRect: Rect;colorDepth: INTEGER;
  271.  quality: CodecQ;cType: CodecType;codec: CompressorComponent;VAR size: LONGINT): OSErr;
  272.  INLINE $7000+$0004,$AAA3;
  273. FUNCTION GetCompressionTime(src: PixMapHandle;VAR srcRect: Rect;colorDepth: INTEGER;
  274.  cType: CodecType;codec: CompressorComponent;VAR spatialQuality: CodecQ;
  275.  VAR temporalQuality: CodecQ;VAR compressTime: LONGINT): OSErr;
  276.  INLINE $7000+$0005,$AAA3;
  277. FUNCTION CompressImage(src: PixMapHandle;VAR srcRect: Rect;quality: CodecQ;
  278.  cType: CodecType;desc: ImageDescriptionHandle;data: Ptr): OSErr;
  279.  INLINE $7000+$0006,$AAA3;
  280. FUNCTION FCompressImage(src: PixMapHandle;VAR srcRect: Rect;colorDepth: INTEGER;
  281.  quality: CodecQ;cType: CodecType;codec: CompressorComponent;clut: CTabHandle;
  282.  flags: CodecFlags;bufferSize: LONGINT;flushProc: FlushProcRecordPtr;progressProc: ProgressProcRecordPtr;
  283.  desc: ImageDescriptionHandle;data: Ptr): OSErr;
  284.  INLINE $7000+$0007,$AAA3;
  285. FUNCTION DecompressImage(data: Ptr;desc: ImageDescriptionHandle;dst: PixMapHandle;
  286.  VAR srcRect: Rect;VAR dstRect: Rect;mode: INTEGER;mask: RgnHandle): OSErr;
  287.  INLINE $7000+$0008,$AAA3;
  288. FUNCTION FDecompressImage(data: Ptr;desc: ImageDescriptionHandle;dst: PixMapHandle;
  289.  VAR srcRect: Rect;matrix: MatrixRecordPtr;mode: INTEGER;mask: RgnHandle;
  290.  matte: PixMapHandle;VAR matteRect: Rect;accuracy: CodecQ;codec: DecompressorComponent;
  291.  bufferSize: LONGINT;dataProc: DataProcRecordPtr;progressProc: ProgressProcRecordPtr): OSErr;
  292.  INLINE $7000+$0009,$AAA3;
  293. FUNCTION CompressSequenceBegin(VAR seqID: ImageSequence;src: PixMapHandle;
  294.  prev: PixMapHandle;VAR srcRect: Rect;VAR prevRect: Rect;colorDepth: INTEGER;
  295.  cType: CodecType;codec: CompressorComponent;spatialQuality: CodecQ;temporalQuality: CodecQ;
  296.  keyFrameRate: LONGINT;clut: CTabHandle;flags: CodecFlags;desc: ImageDescriptionHandle): OSErr;
  297.  INLINE $7000+$000A,$AAA3;
  298. FUNCTION CompressSequenceFrame(seqID: ImageSequence;src: PixMapHandle;VAR srcRect: Rect;
  299.  flags: CodecFlags;data: Ptr;VAR dataSize: LONGINT;VAR similarity: CHAR;
  300.  asyncCompletionProc: CompletionProcRecordPtr): OSErr;
  301.  INLINE $7000+$000B,$AAA3;
  302. FUNCTION DecompressSequenceBegin(VAR seqID: ImageSequence;desc: ImageDescriptionHandle;
  303.  port: CGrafPtr;gdh: GDHandle;VAR srcRect: Rect;matrix: MatrixRecordPtr;
  304.  mode: INTEGER;mask: RgnHandle;flags: CodecFlags;accuracy: CodecQ;codec: DecompressorComponent): OSErr;
  305.  INLINE $7000+$000D,$AAA3;
  306. FUNCTION DecompressSequenceFrame(seqID: ImageSequence;data: Ptr;inFlags: CodecFlags;
  307.  VAR outFlags: CodecFlags;asyncCompletionProc: CompletionProcRecordPtr): OSErr;
  308.  INLINE $7000+$000E,$AAA3;
  309. FUNCTION SetDSequenceMatrix(seqID: ImageSequence;matrix: MatrixRecordPtr): OSErr;
  310.  INLINE $7000+$0010,$AAA3;
  311. FUNCTION SetDSequenceMatte(seqID: ImageSequence;matte: PixMapHandle;VAR matteRect: Rect): OSErr;
  312.  INLINE $7000+$0011,$AAA3;
  313. FUNCTION SetDSequenceMask(seqID: ImageSequence;mask: RgnHandle): OSErr;
  314.  INLINE $7000+$0012,$AAA3;
  315. FUNCTION SetDSequenceTransferMode(seqID: ImageSequence;mode: INTEGER;VAR opColor: RGBColor): OSErr;
  316.  INLINE $7000+$0013,$AAA3;
  317. FUNCTION SetDSequenceDataProc(seqID: ImageSequence;dataProc: DataProcRecordPtr;
  318.  bufferSize: LONGINT): OSErr;
  319.  INLINE $7000+$0014,$AAA3;
  320. FUNCTION SetDSequenceAccuracy(seqID: ImageSequence;accuracy: CodecQ): OSErr;
  321.  INLINE $7000+$0034,$AAA3;
  322. FUNCTION SetDSequenceSrcRect(seqID: ImageSequence;VAR srcRect: Rect): OSErr;
  323.  INLINE $7000+$0035,$AAA3;
  324. FUNCTION GetDSequenceImageBuffer(seqID: ImageSequence;VAR gworld: GWorldPtr): OSErr;
  325.  INLINE $7000+$0015,$AAA3;
  326. FUNCTION GetDSequenceScreenBuffer(seqID: ImageSequence;VAR gworld: GWorldPtr): OSErr;
  327.  INLINE $7000+$0016,$AAA3;
  328. FUNCTION SetCSequenceQuality(seqID: ImageSequence;spatialQuality: CodecQ;
  329.  temporalQuality: CodecQ): OSErr;
  330.  INLINE $7000+$0017,$AAA3;
  331. FUNCTION SetCSequencePrev(seqID: ImageSequence;prev: PixMapHandle;VAR prevRect: Rect): OSErr;
  332.  INLINE $7000+$0018,$AAA3;
  333. FUNCTION SetCSequenceFlushProc(seqID: ImageSequence;flushProc: FlushProcRecordPtr;
  334.  bufferSize: LONGINT): OSErr;
  335.  INLINE $7000+$0033,$AAA3;
  336. FUNCTION SetCSequenceKeyFrameRate(seqID: ImageSequence;keyframerate: LONGINT): OSErr;
  337.  INLINE $7000+$0036,$AAA3;
  338. FUNCTION GetCSequencePrevBuffer(seqID: ImageSequence;VAR gworld: GWorldPtr): OSErr;
  339.  INLINE $7000+$0019,$AAA3;
  340. FUNCTION CDSequenceBusy(seqID: ImageSequence): OSErr;
  341.  INLINE $7000+$001A,$AAA3;
  342. FUNCTION CDSequenceEnd(seqID: ImageSequence): OSErr;
  343.  INLINE $7000+$001B,$AAA3;
  344. FUNCTION GetCompressedImageSize(desc: ImageDescriptionHandle;data: Ptr;
  345.  bufferSize: LONGINT;dataProc: DataProcRecordPtr;VAR dataSize: LONGINT): OSErr;
  346.  INLINE $7000+$001C,$AAA3;
  347. FUNCTION GetSimilarity(src: PixMapHandle;VAR srcRect: Rect;desc: ImageDescriptionHandle;
  348.  data: Ptr;VAR similarity: Fixed): OSErr;
  349.  INLINE $7000+$001D,$AAA3;
  350. FUNCTION GetImageDescriptionCTable(desc: ImageDescriptionHandle;VAR ctable: CTabHandle): OSErr;
  351.  INLINE $7000+$001E,$AAA3;
  352. FUNCTION SetImageDescriptionCTable(desc: ImageDescriptionHandle;ctable: CTabHandle): OSErr;
  353.  INLINE $7000+$001F,$AAA3;
  354. FUNCTION GetImageDescriptionExtension(desc: ImageDescriptionHandle;VAR extension: Handle;
  355.  idType: LONGINT;index: LONGINT): OSErr;
  356.  INLINE $7000+$0020,$AAA3;
  357. FUNCTION SetImageDescriptionExtension(desc: ImageDescriptionHandle;extension: Handle;
  358.  idType: LONGINT): OSErr;
  359.  INLINE $7000+$0021,$AAA3;
  360. FUNCTION FindCodec(cType: CodecType;specCodec: CodecComponent;VAR compressor: CompressorComponent;
  361.  VAR decompressor: DecompressorComponent): OSErr;
  362.  INLINE $7000+$0023,$AAA3;
  363. FUNCTION CompressPicture(srcPicture: PicHandle;dstPicture: PicHandle;quality: CodecQ;
  364.  cType: CodecType): OSErr;
  365.  INLINE $7000+$0024,$AAA3;
  366. FUNCTION FCompressPicture(srcPicture: PicHandle;dstPicture: PicHandle;colorDepth: INTEGER;
  367.  clut: CTabHandle;quality: CodecQ;doDither: sBoolean;compressAgain: sBoolean;
  368.  progressProc: ProgressProcRecordPtr;cType: CodecType;codec: CompressorComponent): OSErr;
  369.  INLINE $7000+$0025,$AAA3;
  370. FUNCTION CompressPictureFile(srcRefNum: INTEGER;dstRefNum: INTEGER;quality: CodecQ;
  371.  cType: CodecType): OSErr;
  372.  INLINE $7000+$0026,$AAA3;
  373. FUNCTION FCompressPictureFile(srcRefNum: INTEGER;dstRefNum: INTEGER;colorDepth: INTEGER;
  374.  clut: CTabHandle;quality: CodecQ;doDither: sBoolean;compressAgain: sBoolean;
  375.  progressProc: ProgressProcRecordPtr;cType: CodecType;codec: CompressorComponent): OSErr;
  376.  INLINE $7000+$0027,$AAA3;
  377. FUNCTION GetPictureFileHeader(refNum: INTEGER;VAR frame: Rect;VAR header: OpenCPicParams): OSErr;
  378.  INLINE $7000+$0028,$AAA3;
  379. FUNCTION DrawPictureFile(refNum: INTEGER;VAR frame: Rect;progressProc: ProgressProcRecordPtr): OSErr;
  380.  INLINE $7000+$0029,$AAA3;
  381. FUNCTION DrawTrimmedPicture(srcPicture: PicHandle;VAR frame: Rect;trimMask: RgnHandle;
  382.  doDither: sBoolean;progressProc: ProgressProcRecordPtr): OSErr;
  383.  INLINE $7000+$002E,$AAA3;
  384. FUNCTION DrawTrimmedPictureFile(srcRefnum: INTEGER;VAR frame: Rect;trimMask: RgnHandle;
  385.  doDither: sBoolean;progressProc: ProgressProcRecordPtr): OSErr;
  386.  INLINE $7000+$002F,$AAA3;
  387. FUNCTION MakeThumbnailFromPicture(picture: PicHandle;colorDepth: INTEGER;
  388.  thumbnail: PicHandle;progressProc: ProgressProcRecordPtr): OSErr;
  389.  INLINE $7000+$002A,$AAA3;
  390. FUNCTION MakeThumbnailFromPictureFile(refNum: INTEGER;colorDepth: INTEGER;
  391.  thumbnail: PicHandle;progressProc: ProgressProcRecordPtr): OSErr;
  392.  INLINE $7000+$002B,$AAA3;
  393. FUNCTION MakeThumbnailFromPixMap(src: PixMapHandle;VAR srcRect: Rect;colorDepth: INTEGER;
  394.  thumbnail: PicHandle;progressProc: ProgressProcRecordPtr): OSErr;
  395.  INLINE $7000+$002C,$AAA3;
  396. FUNCTION TrimImage(desc: ImageDescriptionHandle;inData: Ptr;inBufferSize: LONGINT;
  397.  dataProc: DataProcRecordPtr;outData: Ptr;outBufferSize: LONGINT;flushProc: FlushProcRecordPtr;
  398.  VAR trimRect: Rect;progressProc: ProgressProcRecordPtr): OSErr;
  399.  INLINE $7000+$002D,$AAA3;
  400. FUNCTION ConvertImage(srcDD: ImageDescriptionHandle;srcData: Ptr;colorDepth: INTEGER;
  401.  clut: CTabHandle;accuracy: CodecQ;quality: CodecQ;cType: CodecType;codec: CodecComponent;
  402.  dstDD: ImageDescriptionHandle;dstData: Ptr): OSErr;
  403.  INLINE $7000+$0030,$AAA3;
  404. FUNCTION MakeDitherTable(gdev: GDHandle;VAR ditherTable: DTabHandle): OSErr;
  405.  INLINE $7000+$0031,$AAA3;
  406. FUNCTION DisposeDitherTable(ditherTable: DTabHandle): OSErr;
  407.  INLINE $7000+$0032,$AAA3;
  408. FUNCTION GetCompressedPixMapInfo(pix: PixMapPtr;VAR desc: ImageDescriptionHandle;
  409.  VAR data: Ptr;VAR bufferSize: LONGINT;VAR dataProc: DataProcRecord;VAR progressProc: ProgressProcRecord): OSErr;
  410.  INLINE $7000+$0037,$AAA3;
  411. FUNCTION SetCompressedPixMapInfo(pix: PixMapPtr;desc: ImageDescriptionHandle;
  412.  data: Ptr;bufferSize: LONGINT;dataProc: DataProcRecordPtr;progressProc: ProgressProcRecordPtr): OSErr;
  413.  INLINE $7000+$0038,$AAA3;
  414. FUNCTION GetMatrixType(VAR m: MatrixRecord): INTEGER;
  415.  INLINE $7014,$ABC2;
  416. PROCEDURE CopyMatrix(VAR m1: MatrixRecord;VAR m2: MatrixRecord);
  417.  INLINE $7020,$ABC2;
  418. FUNCTION EqualMatrix(VAR m1: MatrixRecord;VAR m2: MatrixRecord): BOOLEAN;
  419.  INLINE $7021,$ABC2;
  420. PROCEDURE SetIdentityMatrix(VAR matrix: MatrixRecord);
  421.  INLINE $7015,$ABC2;
  422. PROCEDURE TranslateMatrix(VAR m: MatrixRecord;deltaH: Fixed;deltaV: Fixed);
  423.  INLINE $7019,$ABC2;
  424. PROCEDURE TranslateMatrixTo(VAR m: MatrixRecord;deltaH: Fixed;deltaV: Fixed);
  425.  INLINE $701A,$ABC2;
  426. PROCEDURE RotateMatrix(VAR m: MatrixRecord;degrees: Fixed;aboutX: Fixed;
  427.  aboutY: Fixed);
  428.  INLINE $7016,$ABC2;
  429. PROCEDURE ScaleMatrix(VAR m: MatrixRecord;scaleX: Fixed;scaleY: Fixed;aboutX: Fixed;
  430.  aboutY: Fixed);
  431.  INLINE $7017,$ABC2;
  432. PROCEDURE SkewMatrix(VAR m: MatrixRecord;skewX: Fixed;skewY: Fixed;aboutX: Fixed;
  433.  aboutY: Fixed);
  434.  INLINE $7018,$ABC2;
  435. FUNCTION TransformFixedPoints(VAR m: MatrixRecord;VAR fpt: FixedPoint;count: LONGINT): OSErr;
  436.  INLINE $7022,$ABC2;
  437. FUNCTION TransformPoints(VAR mp: MatrixRecord;VAR pt1: Point;count: LONGINT): OSErr;
  438.  INLINE $7023,$ABC2;
  439. FUNCTION TransformFixedRect(VAR m: MatrixRecord;VAR fr: FixedRect;VAR fpp: FixedPoint): BOOLEAN;
  440.  INLINE $7024,$ABC2;
  441. FUNCTION TransformRect(VAR m: MatrixRecord;VAR r: Rect;VAR fpp: FixedPoint): BOOLEAN;
  442.  INLINE $7025,$ABC2;
  443. FUNCTION TransformRgn(VAR mp: MatrixRecord;r: RgnHandle): OSErr;
  444.  INLINE $7000+$0039,$AAA3;
  445. FUNCTION InverseMatrix(VAR m: MatrixRecord;VAR im: MatrixRecord): BOOLEAN;
  446.  INLINE $701C,$ABC2;
  447. PROCEDURE ConcatMatrix(VAR a: MatrixRecord;VAR b: MatrixRecord);
  448.  INLINE $701B,$ABC2;
  449. PROCEDURE RectMatrix(VAR matrix: MatrixRecord;VAR srcRect: Rect;VAR dstRect: Rect);
  450.  INLINE $701E,$ABC2;
  451. PROCEDURE MapMatrix(VAR matrix: MatrixRecord;VAR fromRect: Rect;VAR toRect: Rect);
  452.  INLINE $701D,$ABC2;
  453. PROCEDURE AlignMatrix(VAR mrp: MatrixRecord;VAR srcRect: Rect);
  454.  INLINE $701F,$ABC2;
  455.  
  456.  
  457. {$ENDC} { UsingImageCompression }
  458.  
  459. {$IFC NOT UsingIncludes}
  460.  END.
  461. {$ENDC}
  462.  
  463.